# if running on google colab, uncomment the next line and execute this cell to install the dependencies and prevent "ModuleNotFoundError" in later cells:
!pip install git+https://github.com/NREL/PV_ICE.git@development
import PV_ICE
import os
PV_ICE.__version__
pwd
testfolder = 'Second'
if not os.path.exists(testfolder):
os.makedirs(testfolder)
r1 = PV_ICE.Simulation(name='Sim2', path=testfolder, baselinepath='/content')
Let's discuss as a group what would be a good scenario comparison to define.
#from google.colab import files
#files.upload()
r1.createScenario(name='standard',
massmodulefile=r'baseline_modules_mass_US.csv',
energymodulefile = 'baseline_modules_energy.csv' )
r1.scenario['standard'].addMaterial(materialname='glass',
massmatfile='/content/baseline_material_mass_glass.csv',
energymatfile='/content/baseline_material_energy_glass.csv')
r1.scenario['standard'].addMaterial(materialname='silicon',
massmatfile='/content/baseline_material_mass_silicon.csv',
energymatfile='/content/baseline_material_energy_silicon.csv')
r1.createScenario(name='modified',
massmodulefile=r'baseline_modules_mass_US_modified.csv',
energymodulefile = 'baseline_modules_energy.csv' )
r1.scenario['modified'].addMaterial(materialname='glass',
massmatfile='/content/baseline_material_mass_glass_modified.csv',
energymatfile='/content/baseline_material_energy_glass.csv')
r1.scenario['modified'].addMaterial(materialname='silicon',
massmatfile='/content/baseline_material_mass_silicon.csv',
energymatfile='/content/baseline_material_energy_silicon.csv')
Alternatively, use one of the PV_ICE support functions to modify
or
r1.calculateFlows()
USyearly, UScum = r1.aggregateResults()
r1.saveSimulation()
From this list, select the one that fits your study and select the type of plotting method. There are various plotting options:
plotScenariosComparisonplotMaterialComparisonAcrossScenariosplotMetricResults: You can select the following keyword options: 'VirginStock', 'WasteALL', 'WasteEOL', 'WasteMFG'plotMaterialResultsplotInstalledCapacityResultsYou can also view all the keywords you can use by calling the function without argumnets, or by printing the keys to the module data or the material data
r1.plotMetricResults()
r1.plotScenariosComparison()
r1.plotMaterialComparisonAcrossScenarios(material='silicon', keyword='mat_virgin_eff')
r1.plotMaterialResults(keyword='VirginStock')
r1.plotInstalledCapacityResults()